﻿using AbpApplication.AppServices;
using AbpApplication.InPut;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Identity.Client;

namespace AbpWebapi.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ViewServiceController : ControllerBase
    {
        private readonly IViewService viewService;

        public ViewServiceController(IViewService viewService)
        {
            this.viewService = viewService;
        }

        [HttpPost]
        public  async Task<ApiResponsePage> GetList_View_Materials(InPut_ViewService Input)=>await viewService.GetList_View_Materials(Input);

       
        [HttpPost]
        [Authorize(Roles = "管理员")]
        public async  Task<ApiResponse> GetList_View_User()=>await viewService.GetList_View_User();
        [HttpPost]
        public async Task<ApiResponsePage> GetList_View_NeetOutMaterial(InPut_ViewService2 InPut) => await viewService.GetList_View_NeetOutMaterial(InPut);
        [HttpPost]
        public async Task<ApiResponsePage> GetList_View_InlethouseLine(InPut_ViewService3 InPut) => await viewService.GetList_View_InlethouseLine(InPut);
        [HttpPost]
        public async Task<ApiResponsePage> GetList_View_TaskOrder(InPut_ViewService4 InPut) => await viewService.GetList_View_TaskOrder(InPut);
        [HttpPost]
        public async Task<ApiResponsePage> GetList_View_Box(InPut_ViewService5 InPut) => await viewService.GetList_View_Box(InPut);
        [HttpPost]
        public async Task<ApiResponse> GetList_View_Box_Material(string BoxCode) => await viewService.GetList_View_Box_Material(BoxCode);
        [HttpPost]
        public async Task<ApiResponsePage> GetList_View_Logs(InPut_ViewService6 InPut) => await viewService.GetList_View_Logs(InPut);
        [HttpPost]
        public async Task<ApiResponse> GetList_View_TaskOrder_OrderNo()=>await viewService.GetList_View_TaskOrder_OrderNo();
        [HttpPost]
        public async Task<ApiResponse> QuaneryList_View_TaskOrder(InPut_ViewService7 InPut) => await viewService.QuaneryList_View_TaskOrder(InPut);
        [HttpPost]
        public async Task<ApiResponse> SingleView_TaskOrder(string TaskOrderCode) => await viewService.SingleView_TaskOrder(TaskOrderCode);
        [HttpPost]
        public  async Task<ApiResponse> GetList_View_repestorder()=>await viewService.GetList_View_repestorder();
        [HttpPost]
        public async Task<ApiResponse> GetList_View_Proportion(InPut_ViewService8 InPut) =>await viewService.GetList_View_Proportion(InPut);
        [HttpPost]
        public async Task<ApiResponse> GetList_View_SowingWarehouseLine() => await viewService.GetList_View_SowingWarehouseLine();
    }
}
